package com.lhd.entity.po;

import java.io.Serializable;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.lhd.entity.dto.AdditionInfoDto;

import java.text.SimpleDateFormat;

/**
 * @Author: liuhd
 * @Date: 2025/03/16
 * @Description: 一次签到活动中的签到记录
 */
public class Record implements Serializable {
	private Integer id;

	/**
	 * 学生id
	 */
	private Integer stuId;

	/**
	 * 0：成功签到，1：缺勤，2：事假，3：病假，4：公假，5：迟到，6：早退
	 */
	private String status;

	/**
	 * 签到时间
	 */
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
	private Date createTime;

	/**
	 * 当前签到活动的id
	 */
	private Integer aid;


	//a.title title,a.type type,a.last_time lastTime,a.create_time startTime,a.end_time endTime

	@JsonInclude(JsonInclude.Include.NON_NULL)
	private String title;
	@JsonInclude(JsonInclude.Include.NON_NULL)
	private String type;
	@JsonInclude(JsonInclude.Include.NON_NULL)
	private Long lastTime;
	@JsonInclude(JsonInclude.Include.NON_NULL)
	private Integer isVerify;

	@JsonInclude(JsonInclude.Include.NON_NULL)
	private String username;
	@JsonInclude(JsonInclude.Include.NON_NULL)
	private String jobCode;
	@JsonInclude(JsonInclude.Include.NON_NULL)
	private String avatar;
	@JsonInclude(JsonInclude.Include.NON_NULL)
	private String institute;
	@JsonInclude(JsonInclude.Include.NON_NULL)
	private String major;
	@JsonInclude(JsonInclude.Include.NON_NULL)
	private String className;

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
	private Date startTime;

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
	private Date endTime;
	@JsonInclude(JsonInclude.Include.NON_NULL)
	private AdditionInfoDto additionInfoDto;
	@JsonInclude(JsonInclude.Include.NON_NULL)
	private String courseName;
	@JsonInclude(JsonInclude.Include.NON_NULL)
	private String teacherName;

	public String getCourseName() {
		return courseName;
	}

	public void setCourseName(String courseName) {
		this.courseName = courseName;
	}

	public String getTeacherName() {
		return teacherName;
	}

	public void setTeacherName(String teacherName) {
		this.teacherName = teacherName;
	}

	public AdditionInfoDto getAdditionInfoDto() {
		return additionInfoDto;
	}

	public void setAdditionInfoDto(AdditionInfoDto additionInfoDto) {
		this.additionInfoDto = additionInfoDto;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getJobCode() {
		return jobCode;
	}

	public void setJobCode(String jobCode) {
		this.jobCode = jobCode;
	}

	public String getAvatar() {
		return avatar;
	}

	public void setAvatar(String avatar) {
		this.avatar = avatar;
	}

	public String getInstitute() {
		return institute;
	}

	public void setInstitute(String institute) {
		this.institute = institute;
	}

	public String getMajor() {
		return major;
	}

	public void setMajor(String major) {
		this.major = major;
	}

	public String getClassName() {
		return className;
	}

	public void setClassName(String className) {
		this.className = className;
	}

	public Integer getIsVerify() {
		return isVerify;
	}

	public void setIsVerify(Integer isVerify) {
		this.isVerify = isVerify;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public Long getLastTime() {
		return lastTime;
	}

	public void setLastTime(Long lastTime) {
		this.lastTime = lastTime;
	}

	public Date getStartTime() {
		return startTime;
	}

	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}

	public Date getEndTime() {
		return endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getStuId() {
		return stuId;
	}

	public void setStuId(Integer stuId) {
		this.stuId = stuId;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Integer getAid() {
		return aid;
	}

	public void setAid(Integer aid) {
		this.aid = aid;
	}

	@Override
	public String toString() {
		return "id : " + (id == null ? "空" : id) + ",学生id : " + (stuId == null ? "空" : stuId) + ",0：成功签到，1：缺勤，2：事假，3：病假，4：公假，5：迟到，6：早退 : " + (status == null ? "空" : status) + ",签到时间 : " + (createTime == null ? "空" : new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(createTime)) + ",当前签到活动的id : " + (aid == null ? "空" : aid) ;
	}
}